

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>

</title><meta http-equiv="X-UA-Compatible" content="IE=7" /><link href="css/MainStyle.css" rel="stylesheet" type="text/css" />
    <script src="js/cAlert.js" type="text/javascript"></script>
    <script src="js/WdatePicker.js" type="text/javascript"></script>
    
    <script src="js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <!--[if IE]><script src="../../Res/JS/Platform/btrc1/other_libs/excanvas_r3/excanvas.js" type="text/javascript" charset="utf-8"></script><![endif]-->
    <script src="js/jquery.bt.min.js" type="text/javascript"
        charset="utf-8"></script>
    
    <!--[if IE]><link href="../../Res/JS/Platform/btrc1/DEMO/demofiles/demo-ie-fix.css" rel="stylesheet" type="text/css" /><![endif]-->
    
    <link href="css/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" />
    
    <script src="js/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
    <script src="js/autoComplete.js" type="text/javascript"></script>
    <style type="text/css">
        .mainx
        {
            width: auto;
        }
        .Childx
        {
            width: 230px;
            float: left;
        }
        .ui-button
        {
            margin-left: 0px;
        }
        .ui-button-icon-only .ui-button-text
        {
            padding: 0.15em;
        }
        .ui-autocomplete-input
        {
            margin: 0;
            padding: 0.18em 0 0.18em 0.18em;
            font-size: 12px;
        }
        .Company
        {
            width: 260px;
        }
        .City
        {
            width: 80px;
        }
        .Granary
        {
            width: 260px;
        }
        li
        {
            height: 18px;
        }
        .iConButton, .storeButton
        {
            cursor: hand;
        }
        .CheckColor
        {
            background-color: #D9E7F8;
        }
        .GrainColor
        {
            background-color: #F1EDED;
        }
        .Start
        {
            color: red;
        }
        .WenDuAlign
        {
            text-align: left;
        }
        .imgWeidu{ width:16px; height:16px;}
    </style>
</head>
<body>
    <form name="form1" method="post" action="TempOrHumWaring.aspx?gid=DC0000000356957&amp;datetime=2017%2f5%2f26+10%3a53%3a17&amp;flag=0&amp;windowWidth=1200" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMjEyMjUwNTQzOQ9kFgICAQ9kFgoCAg8QZA8WAWYWARAFLeS4reWbveWCqOWkh+eyrueuoeeQhuaAu+WFrOWPuOays+WNl+WIhuWFrOWPuAUPU0EwMDAwMDAwMDAwMDM1ZxYBZmQCAw8QZGQWAGQCBQ8QZBAVATPlhYnlsbHljr/lkIzlr4znsq7po5/otLjmmJPmnInpmZDotKPku7vlhazlj7jlupPngrkVAQ9EQzAwMDAwMDAzNTY5NTcUKwMBZxYBZmQCCw8WAh4HVmlzaWJsZWhkAgwPFgIfAGhkZMW1cnYwM2U/0Glb7DceZ4z4iDqzmvIivfAeoCl6w2xS" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>


<script src="/GSDC/WebResource.axd?d=zHDbwQNBZkRzBNw2y9i1xg2&amp;t=635694614495804448" type="text/javascript"></script>


<script src="/GSDC/ScriptResource.axd?d=2-U7prMC6qCzWBWmoATkVPRCphLz80qe0iL8druuXGlXVr0BXQbHc9Qw6r2YAC4zSa1KFXTc7eSvrMa-_PM1QrIDP4a2DXGuKrn2AWZqc4A1&amp;t=16ab2387" type="text/javascript"></script>
<script src="/GSDC/ScriptResource.axd?d=2-U7prMC6qCzWBWmoATkVPRCphLz80qe0iL8druuXGlXVr0BXQbHc9Qw6r2YAC4zTyvgvKd2n8rrVS-QvZ7VAlSVRDlnt35HOIPZVfpgGYo1&amp;t=16ab2387" type="text/javascript"></script>
<div>

	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWEAKcx93YCQKjzu7EAQK+5ZrtBQK8hMyGBgLN84PrDgKDueP9CAKAv+isBgKuzNzhAgLzhaL/DgKk2/vQAwLF/c//CwLbxK63CAKe3Y3gBQKYyPuGCALHr6PFBgLluvS0ASbVoP0AjepQ/EExFDh/vOAjoLRh9zEkoRZ4rG8pYiOE" />
</div>
    <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager1', 'form1', [], [], [], 90, '');
//]]>
</script>

    <table width="100%" class="noboder">
        <tr>
            <td colspan="4" class="tdthread">
                温度湿度预警
            </td>
        </tr>
        <tr class="noboder">
            <td colspan="4">
                <table width="100%">
                    <tr class="noboder">
                        <td class="tbtitle">
                            分公司：
                        </td>
                        <td class="tbright">
                            &nbsp;<select name="ddl_Company_AutoComplete" id="ddl_Company_AutoComplete" mark="Company" class="Company_AutoComplete" style="display: none;">
<option value="">Select one...</option><option value="SA0000000000035" title="zhongguochubeiliangguanlizonggongsihenanfengongsi">中国储备粮管理总公司河南分公司</option></select><input class="Company ui-autocomplete-input ui-widget ui-widget-content ui-corner-left" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"><button type="button" style="font-size: 12px; height: 24px;" tabindex="-1" title="显示全部信息！" class="ui-button ui-widget ui-state-default ui-button-icon-only ui-corner-right .ui-button-icon-only" role="button" aria-disabled="false"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"></span><span class="ui-button-text">&nbsp;</span></button>
                            &nbsp;
                            
                        </td>
                        <td class="tbtitle">
                            粮库：
                        </td>
                        <td class="tbright">
                            
                            
                            &nbsp;<select name="ddl_Granary_AutoComplete" id="ddl_Granary_AutoComplete" class="Granary_AutoComplete" mark="Granary" style="display: none">
<option value="">Select one...</option><option value="DC0000000356957" title="guangshanxiantongfuliangshimaoyiyouxianzerengongsikudian">光山县同富粮食贸易有限责任公司库点</option></select><input class="Granary ui-autocomplete-input ui-widget ui-widget-content ui-corner-left" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"><button type="button" style="font-size: 12px; height: 24px;" tabindex="-1" title="显示全部信息！" class="ui-button ui-widget ui-state-default ui-button-icon-only ui-corner-right .ui-button-icon-only" role="button" aria-disabled="false"><span class="ui-button-icon-primary ui-icon ui-icon-triangle-1-s"></span><span class="ui-button-text">&nbsp;</span></button>
                            &nbsp;
                        </td>
                    </tr>
                    <tr class="noboder">
                        <td class="tbtitle">
                            时间：
                        </td>
                        <td class="tbright">
                            &nbsp;<input name="txtTime" type="text" value="2017-05-26" id="txtTime" class="Wdate" onfocus="WdatePicker({skin:&#39;whyGreen&#39;,dateFmt:&#39;yyyy-MM-dd&#39;,maxDate:&#39;%y-%M-%d&#39;})" />
                            &nbsp;&nbsp;<span id="lbWeatherInfo"></span>
                        </td>
                        <td class="tbtitle">
                            排序：
                        </td>
                        <td class="tbright">
                            <select name="selectSortMethod" id="selectSortMethod" class="sortmethod" style="width: 100px;">
	<option value="0">默认</option>
	<option value="1">储备类型</option>
</select>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="4" class="tdbtnNew">
                <input type="submit" name="btn_Query" value="查 询" id="btn_Query" class="anni1 Query" />
                
                
                
                
                    
                <input name="btnScorePreView" type="button" id="btnScorePreView" ValidationGroup="993010" class="RedirectOtherPage anni1" style="display:none;" value="考核预览" lang="./Pages/Basic/GranaryScorePreView.aspx" />
                <span id="Label1" style="color:Red;"></span><br />
                <span id="Label2" style="color:Red;"></span>
                <div>
                    <span style="float: none; height: 8px;" class="iConButton">
                        <img src='imgs/Square_Abnormal.gif' width='30px' height='20px'
                            id="CW01" border='0' onmousemove="toolTip('<img src=imgs/Square_Abnormal.gif width=90px height=50px border=0 />')"
                            onmouseout='toolTip()' /><label>【温度/湿度异常仓房】</label></span>&nbsp;&nbsp; <span style="float: none;
                                height: 8px;" class="iConButton">
                                <img src='imgs/Square_cwyc.gif' width='30px' height='20px'
                                    id="CW02" border='0' onmousemove="toolTip('<img src=imgs/Square_cwyc.gif width=90px height=50px border=0 />')"
                                    onmouseout='toolTip()' /><label>【测温异常】</label></span>&nbsp;&nbsp;
                    <span style="float: none; height: 8px;" class="iConButton">
                        <img src='imgs/Square_b.gif' width='30px' height='20px'
                            id="CW03" border='0' onmousemove="toolTip('<img src=imgs/Square_b.gif width=90px height=50px border=0 />')"
                            onmouseout='toolTip()' /><label>【未上传数据】</label></span>&nbsp;&nbsp; <span style="float: none;
                                height: 8px;" class="iConButton">
                                <img src='imgs/Square_Normal.gif' width='30px' height='20px'
                                    id="CW04" border='0' onmousemove="toolTip('<img src=imgs/Square_Normal.gif width=90px height=50px border=0 />')"
                                    onmouseout='toolTip()' /><label>【正常仓房】</label></span>&nbsp;&nbsp;
                    <span style="float: none; height: 8px;" class="iConButton">
                        <img src='imgs/Square_a.gif' width='30px' height='20px'
                            id="CW05" border='0' onmousemove="toolTip('<img src=imgs/Square_a.gif width=90px height=50px border=0 />')"
                            onmouseout='toolTip()' />
                        <label>
                            【空仓】</label></span> <span style="float: none; height: 8px;" class="iConButton">
                                <img src='imgs/Square_weifenxi.gif' width='30px' height='20px'
                                    id="CW06" border='0' onmousemove="toolTip('<img src=imgs/Square_weifenxi.gif width=90px height=50px border=0 />')"
                                    onmouseout='toolTip()' /><label>【非远程监控仓房】</label></span><label style="color: red">（提示：点击图片可以进行分类查询！）</label>
                </div>
            </td>
        </tr>
    </table>
    
    <div style="width: auto; height: auto;" id="NonePosition">
        
    </div>
    <div style="width: 100%">
        <div style="width: 100%">
            <table class="noboder" border="1" width="100%">
                <tr style='display:none;'>
                    <td width="10px" height="10px" valign="middle">
                    </td>
                    <td height="10px" align="center">
                        <span style="float: left;">
                            <input name="btn_Pause" type="button" id="btn_Pause" style="display: none" class="anni1" />
                            <span id="lbPauseMsg" style="color: red"></span>
                        </span><span style="color: Red;">
                            &nbsp;</span>
                        
                        
                    </td>
                    <td width="10px" height="10px" valign="middle">
                    </td>
                </tr>
                <tr>
                    
                    <td valign="middle" colspan="3">
                        <div id="dvContent" style="width: auto; height: auto;">
                            <div id="dvSortByHouseID">
                                
                            </div>
                            <div id="dvSortByChubei">
                            </div>
                        </div>
                        <div id="dvContentInspection" style="width: auto; height: auto;">
                        </div>
                        <div>
                        </div>
                    </td>
                    
                </tr>
                <tr style='display:none;'>
                    
                    <td style="height: 10px; vertical-align: middle; text-align: center;">
                        &nbsp;
                    </td>
                    
                </tr>
            </table>
        </div>
    </div>
    <input type="hidden" name="hdCompany" id="hdCompany" />
    <input type="hidden" name="hdCompanyName" id="hdCompanyName" />
    <input type="hidden" name="hdCity" id="hdCity" />
    <input type="hidden" name="hdGranary" id="hdGranary" value="DC0000000356957" />
    <input type="hidden" name="hdGranaryName" id="hdGranaryName" />
    <input type="hidden" name="hdWindowWidth" id="hdWindowWidth" value="1200" />
    <input type="hidden" name="hdStoreStatus" id="hdStoreStatus" />
    <input type="hidden" name="hdDataSouse" id="hdDataSouse" value="One" />
    </form>
</body>
<script language="javascript" type="text/javascript">
    function openTempOrHumAutoLookView(companyId, granaryID, time) {

        var url = "TempOrHumWarningAutoLook.aspx?CompanyID=" + companyId + "&GranaryID=" + granaryID + "&Time=" + time + "&GranaryName=" + $("#hdGranaryName").val();
        show("粮情巡检" + " (" + $("#hdCompanyName").val() + ")", url, 585, 1024, 1);
    }

    var client = "0";
    $(document).ready(function () {
        $(".storeTable").each(function () {//超出大小时候隐藏，防止单元格中的内容宽度大于单元格宽度时候换行
            var v = $(this).find("td").eq(0); //仓房名称单元格
            v.html("<div style='width:145px; overflow:hidden; white-space:nowrap; word-break: break-all;' title='" + v.text() + "'>" + v.html() + "</div>");
            v = $(this).find("td").eq(4); //储粮单元格
            if (v.html() != null && v.html().indexOf("]") >= 0 && v.html().indexOf("[") >= 0 && v.html().indexOf("]") - v.html().indexOf("[") > 3)//.indexOf("食用油") >= 0)
                v.html("<div style='width:90px; overflow:hidden; white-space:nowrap; word-break: break-all;' title='" + v.text() + "'>" + v.html() + "</div>");
            v = $(this).find("td").eq(6); //储粮单元格
            if (v.html() != null && v.html().indexOf("]") >= 0 && v.html().indexOf("[") >= 0 && v.html().indexOf("]") - v.html().indexOf("[") > 3)//.indexOf("食用油") >= 0)
                v.html("<div style='width:90px; overflow:hidden; white-space:nowrap; word-break: break-all;' title='" + v.text() + "'>" + v.html() + "</div>");
        });
        changeview();
        //加载AutoComplete全部数据
        Loding("DC0000000356957", "光山县同富粮食贸易有限责任公司库点", "YHLX0105", "DC0000000356957");
        if ('YHLX0105' == 'YHLX0101') {
            $("#btnScorePreView").show();
        }
        $("#hdWindowWidth").val($(window).width());  //获取当前初始化页面可视窗口的宽度
        //查询提示
        $(".Query").click(function () {
            if (client == '0') {
                $("#hdWindowWidth").val($(window).width()); //获取可视窗口的宽度

                if ($("#hdCompany").val() == "") {
                    alert('请选择分公司！');
                    $(".Company_AutoComplete").next("input").focus();
                    return false;
                } else if ($("#hdGranary").val() == "") {
                    alert('请选择粮库！');
                    $(".Granary_AutoComplete").next("input").focus();
                    return false;
                } else if (document.getElementById("txtTime").value == "") {
                    alert('请选择时间！');
                    return false;
                }
            }
            else {
                return checkInfo();
            }

        })

        //粮情巡检
        $("#btn_QueryInspection").click(function () {
            $("#hdWindowWidth").val($(window).width());  //获取当前可视窗口的宽度

            if ($("#hdCompany").val() == "") {
                alert('请选择分公司！');
                $(".Company_AutoComplete").next("input").focus();
                return false;
            }
            else {
                openTempOrHumAutoLookView($("#hdCompany").val(), $("#hdGranary").val(), $("#txtTime").val());
                return false;
            }
        })
        //功能跳转
        $(".RedirectOtherPage").click(function () {
            if ($("#hdCompany").val() == "") {
                alert('请选择分公司！');
                $(".Company_AutoComplete").next("input").focus();
                return false;
            } else if ($("#hdGranary").val() == "") {
                alert('请选择粮库！');
                $(".Granary_AutoComplete").next("input").focus();
                return false;
            } else if (document.getElementById("txtTime").value == "") {
                alert('请选择时间！');
                return false;
            }

            var checkUrl = $(this).attr("lang");   //获取要跳转到的页面
            var checkText = $(this).val();         //获取Select选择的Text 
            var checkValue = $(this).attr("validationgroup"); //获取Select选择的Value 

            openPanelWithMenu(checkValue, checkText, checkUrl + "?cid=" + $("#hdCompany").val() + "&gid=" + $("#hdGranary").val() + "&GranaryName=" + $("#hdGranaryName").val() + "&datetime=" + CurentTime() + "&windowWidth=" + $("#hdWindowWidth").val());

        });

        //显示/隐身仓房分类
        $("#storeSort").toggle(
            function () {
                $(this).val("本库汇总↑").attr("title", "隐藏本库汇总");
                $("#dvStoreSort").fadeIn("slow");

            },
            function () {
                $(this).val("本库汇总↓").attr("title", "查看本库汇总");
                $("#dvStoreSort").fadeOut("fast");
            }
        );
        //查看仓房明细
        $(".storeTable").hover(
            function () {
                $(this).find("td").css("color", "red");
                $(this).css({ "cursor": "hand", "text-decoration": "underline" })
            },
            function () {
                $(this).find("td").css("color", "black");
                $(this).css("text-decoration", "none")
            });
        $(".storeTable").click(function () {
            var StoreID = $(this).attr("lang");
            ShowInfo(StoreID);
        });
        $(".storeButton").click(function () {
            var StoreID = $(this).attr("id");
            ShowInfo(StoreID);
        });
        //按分类查询仓房
        $(".iConButton").click(function () {
            var StoreStatus = $(this).find("img").attr("id");

            $("#hdStoreStatus").val(StoreStatus);

            $("#btn_Query").click();
        });
        $(".iConButton").hover(
            function () {
                $(this).find("label").css("color", "red");
                $(this).find("label").css("text-decoration", "underline")
            },
            function () {
                $(this).find("label").css("color", "black");
                $(this).find("label").css("text-decoration", "none")
            });
        $(".storeButton").hover(
            function () {
                $(this).css("color", "red");
                $(this).css("text-decoration", "underline")
            },
            function () {
                $(this).css("color", "black");
                $(this).css("text-decoration", "none")
            });
        $("#dvContent a").each(function () {
            if ($.trim($(this).attr("isShow")) != "") {
                $(this).bt({
                    ajaxPath: ["$(this).attr('mainid')", 'div#midright'], width: 550, fill: 'white', closeWhenOthersOpen: true,
                    trigger: ['hover']
                });
            }
        });

        //返回全部仓房
        $("#btnQueryAll").click(function () {

            $("#btn_Query").click();
        });

        $("#NonePosition a").each(function () {
            if ($.trim($(this).attr("isShow")) != "") {
                $(this).bt({
                    ajaxPath: ["$(this).attr('mainid')", 'div#midright'], width: 550, fill: 'white', closeWhenOthersOpen: true,
                    trigger: ['hover']
                });
            }
        });
        $(".checktime").attr("title", "粮情平台检测分析时粮食储量");
        $(".grain").attr("title", "保管员最后更新粮食储量 ");
        $("#selectSortMethod").change(function () {
            changeview();
        });
        function changeview() {
            var selected = $("#selectSortMethod").children('option:selected');
            //alert(selected.val());
            if (selected.val() == "0") {
                //$("#dvSortByHouseID").empty();
                $.each($("[data-index]"), function (index, ob) {
                    $(this).remove().appendTo($("#dvSortByHouseID"));
                });
                $("#dvSortByChubei").empty();
            }
            else if (selected.val() == "1") {
                $("#dvSortByChubei").empty();
                var chubeis = ['ZC', 'ZD', 'LC', 'TC', 'HC', 'SC'];
                var chubeinames = ["中央储备", "托市粮", "临时储备", "特种储备", "混合储备", "商品储备"];
                $.each(chubeis, function (cbi, cb) {
                    var items = $("[data-chubei='" + cb + "']");
                    if (items.length > 0) {
                        var obcbi = $("<div style='margin:3px 0px;'><div style=\" width:131px;background:url('imgs/title-bg.png') no-repeat;\"><table style='border:none;'><tr><td style=' text-align:center; width:80px; border:none;'><span >" + chubeinames[cbi] + "</span></td><td style='width:50px; text-align:center; border:none;' class='shouqi' ><img src='imgs/down.png' /></td></tr></table></div></div>");
                        var obcbiContainer = $("<div></div>");
                        obcbiContainer.appendTo(obcbi);
                        $.each(items, function (i, val) {
                            $(this).remove().appendTo(obcbiContainer);
                        });
                        $("<div style='clear:both;'></div>").appendTo(obcbi);
                        obcbi.appendTo($("#dvSortByChubei"));
                    }
                });
                $("#dvSortByHouseID").empty();
            }
        }

        $(".shouqi").live('click', function () {
            $(this).parent().parent().parent().parent().next().slideUp();
            $($(this).children().eq(0)).attr('src', 'imgs/up.png');
            $(this).removeClass("guanbi");
            $(this).addClass("zhankai");
        });
        $(".zhankai").live('click', function () {
            $(this).parent().parent().parent().parent().next().slideDown();
            $($(this).children().eq(0)).attr('src', 'imgs/down.png');
            $(this).removeClass("zhankai");
            $(this).addClass("shouqi");
        });
    });
    //获取时间
    function CurentTime() {
        var now = new Date();

        var year = now.getFullYear();       //年
        var month = now.getMonth() + 1;     //月
        var day = now.getDate();            //日

        var hh = now.getHours();            //时
        var mm = now.getMinutes();          //分

        var clock = year + "-";

        if (month < 10)
            clock += "0";

        clock += month + "-";

        if (day < 10)
            clock += "0";

        clock += day + " ";

        //            if (hh < 10)
        //                clock += "0";

        //            if (mm < 10)
        //                clock += "0";

        return (clock);
    }
    function openPanelWithMenu(node_id, node_text, node_url) {
        var v = node_url.indexOf("top=1", 0);
        if (v >= 0) {
            var newpage = window.open(node_url);
            newpage.blur();
            return;
        }
        var n = window.top.center.getComponent(node_id);

        if (n) { //判断是否已经打开该面板
            window.top.center.remove(n);
        }
        n = window.top.center.add({
            xtype: "panel",
            id: node_id,
            iconCls: 'totalicon',
            title: node_text,
            closable: true,  //通过html载入目标页
            html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="' + node_url + '"></iframe>'
        });
        window.top.center.setActiveTab(n);
    }

    function isFromClient() {
        var url = document.URL.split('?');
        var result = '';
        if (url.length > 0) {
            var param = '&' + url[1];
            if (param.indexOf('&from') != -1) {
                if (param.substring(param.indexOf('from'), param.length).indexOf('&') != -1) {
                    var paramste = param.substring(param.indexOf('from'), param.length);
                    result = paramste.substr(paramste.indexOf('from'), paramste.indexOf('&') - paramste.indexOf('from'));

                }
                else {
                    result = param.substring(param.indexOf('from'), param.length);
                }
            }
        }
        return result;
    }

    function ShowInfo(StoreHouseId) {
        var param = isFromClient()
        var url = "ViewStoreInfo.aspx?ID=" + StoreHouseId + "&GranaryID=" + $("#hdGranary").val() + "&" + param;
        show("仓房详细信息", url, 480, 810, 1);
    }
    function ShowInfo2(url) {
        //url = url + "&companyid=" + document.getElementById("ddlCompany").value
        url = url + "&companyid=" + $(".Company_AutoComplete").val();
        show("粮仓测控数据详情", url, 600, 800, 1);
        //show("粮仓测控数据详情", url, 450, 650, 1);
        //popup = new show("粮仓测控数据详情", url, 600, 800, 1);
    }
    // 关闭窗口，同时刷新页面

    function openLoginDialog() {
        openDialog('localhost:8080/bbs/form/login.jsp', '登录', 435, 420)
    }

    function closePopup(msg) {
        if (popup != null) {
            alert(msg);
            popup.Hide();
        } else {
            alert(msg);
            popup = null;
        }
    }
    function checkInfo() {

        if ($.trim($("#ddlCompany").val()) == "") {
            alert("请选择分公司2");
            return false;
        }
        if ($("#ddlOrg option").length == 0 || $.trim($("#ddlOrg").val()) == "") {
            alert("请选择粮库");
            return false;
        }
        if ($.trim($("#txtTime").val()) == "") {
            alert("请选择时间");
            return false;
        }
        $("#hdCompany").val($("#ddlCompany").val());
        $("#hdGranary").val($("#ddlOrg").val());

    }
    function getViewportHeight() {
        if (window.innerHeight != window.undefined) return window.innerHeight;
        if (document.compatMode == 'CSS1Compat') return document.documentElement.clientHeight;
        if (document.body) return document.body.clientHeight;

        return window.undefined;
    }
    function getViewportWidth() {
        if (window.innerWidth != window.undefined) return window.innerWidth;
        if (document.compatMode == 'CSS1Compat') return document.documentElement.clientWidth;
        if (document.body) return document.body.clientWidth;

        return window.undefined;
    }
    function getScrollTop() {
        if (self.pageYOffset) {
            return self.pageYOffset;
        }
        else if (document.documentElement && document.documentElement.scrollTop) {
            return document.documentElement.scrollTop;
        }
        else if (document.body) {
            return document.body.scrollTop;
        }
    }
    function getScrollLeft() {
        if (self.pageXOffset) {
            return self.pageXOffset;
        }
        else if (document.documentElement && document.documentElement.scrollLeft) {
            return document.documentElement.scrollLeft;
        }
        else if (document.body) {
            return document.body.scrollLeft;
        }
    }

    var rT = true; //允许图像过渡
    var bT = true; //允许图像淡入淡出
    var tw = 150; //提示框宽度
    var endaction = false; //结束动画
    var ns4 = document.layers;
    var ns6 = document.getElementById && !document.all;
    var ie4 = document.all;
    offsetX = 10;
    offsetY = 20;
    var toolTipSTYLE = "";
    function initToolTips() {
        tempDiv = document.createElement("div");
        tempDiv.id = "toolTipLayer";
        tempDiv.style.position = "absolute";
        tempDiv.style.display = "none";
        document.body.appendChild(tempDiv);
        if (ns4 || ns6 || ie4) {
            if (ns4) toolTipSTYLE = document.toolTipLayer;
            else if (ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
            else if (ie4) toolTipSTYLE = document.all.toolTipLayer.style;
            if (ns4) document.captureEvents(Event.MOUSEMOVE);
            else {
                toolTipSTYLE.visibility = "visible";
                toolTipSTYLE.display = "none";
            }
            document.onmousemove = moveToMouseLoc;
        }
    }
    function toolTip(msg, fg, bg) {
        try {
            if (toolTip.arguments.length < 1) // hide
            {
                if (ns4) {
                    toolTipSTYLE.visibility = "hidden";
                }
                else {
                    if (!endaction) { toolTipSTYLE.display = "none"; }
                    if (rT) document.all("msg1").filters[1].Apply();
                    if (bT) document.all("msg1").filters[2].Apply();
                    document.all("msg1").filters[0].opacity = 0;
                    if (rT) document.all("msg1").filters[1].Play();
                    if (bT) document.all("msg1").filters[2].Play();
                    if (rT) {
                        if (document.all("msg1").filters[1].status == 1 || document.all("msg1").filters[1].status == 0) {
                            toolTipSTYLE.display = "none";
                        }
                    }
                    if (bT) {
                        if (document.all("msg1").filters[2].status == 1 || document.all("msg1").filters[2].status == 0) {
                            toolTipSTYLE.display = "none";
                        }
                    }
                    if (!rT && !bT) toolTipSTYLE.display = "none";
                }
            }
            else {
                if (!fg) fg = "#777777";
                if (!bg) bg = "#eeeeee";
                var htmlstrt = "";
                var list = new Array();
                list = msg.split(',');
                for (var i = list.length - 1; i >= 1; i--) {
                    if (list[i] == "1")//空层
                    { htmlstrt += "<div style='height:15px;width:auto;background-image:url(imgs/ceng.gif);text-align:center;color:Red;'>空</div>"; }
                    else if (list[i] == "2")//数据异常
                    { htmlstrt += "<div style='height:15px;width:auto;background-image:url(imgs/ceng.gif);text-align:center;color:Red;'>测温信息点异常</div>"; }
                    else
                    { htmlstrt += "<div style='background-image:url(imgs/ceng.gif);height:15px;width:auto;text-align:center;'>满</div>"; }
                }
                var content = "<div style='width:78px;text-align:center;'><div style='width:auto;'><img src='imgs/toppp.gif' border='0' /></div>" + htmlstrt + "</div>";
                if (htmlstrt == "")
                { content = msg; }

                if (ns4) {
                    toolTipSTYLE.document.write(content);
                    toolTipSTYLE.document.close();
                    toolTipSTYLE.visibility = "visible";
                }
                if (ns6) {
                    document.getElementById("toolTipLayer").innerHTML = content;
                    toolTipSTYLE.display = 'block'
                }
                if (ie4) {
                    document.all("toolTipLayer").innerHTML = content;
                    toolTipSTYLE.display = 'block'
                    //--图象过渡，淡入处理--
                    var cssopaction = document.all("msg1").filters[0].opacity
                    document.all("msg1").filters[0].opacity = 0;
                    if (rT) document.all("msg1").filters[1].Apply();
                    if (bT) document.all("msg1").filters[2].Apply();
                    document.all("msg1").filters[0].opacity = cssopaction;
                    if (rT) document.all("msg1").filters[1].Play();
                    if (bT) document.all("msg1").filters[2].Play();
                }
            }
        } catch (e) { }
    }
    function moveToMouseLoc(e) {
        var scrollTop = getScrollTop();
        var scrollLeft = getScrollLeft();
        if (ns4 || ns6) {
            x = e.pageX + scrollLeft;
            y = e.pageY - scrollTop;
        }
        else {
            x = event.clientX + scrollLeft;
            y = event.clientY;
        }

        if (x - scrollLeft > getViewportWidth() / 2) {
            x = x - document.getElementById("toolTipLayer").offsetWidth - 2 * offsetX;
        }

        if ((y + document.getElementById("toolTipLayer").offsetHeight + offsetY) > getViewportHeight()) {
            y = getViewportHeight() - document.getElementById("toolTipLayer").offsetHeight - offsetY;
        }
        toolTipSTYLE.left = (x + offsetX) + 'px';
        toolTipSTYLE.top = (y + offsetY + scrollTop) + 'px';
        return true;
    }
    initToolTips();
</script>
<script type="text/javascript">
    function openReports(storehouseID, serialno2, analytime) {
        //var url = "StoreHouseCurrentReportManage.aspx?storehouseid=" + storehouseID + (serialno2 == "" ? "" : ("&serialno2=" + serialno2)) + "&analytime=" + analytime;
        //show("仓房储量状态简报", url, 450, 900, 1);

        if (confirm("是否要到仓房储粮简报管理页面？"))
        { openPanelWithMenu2() };
    }

    function openPanelWithMenu2() {
        var node_id = "003021";
        var node_text = "仓房储粮简报管理";
        var node_url = "Pages/StoreWarning/StoreHouseBriefReportInfo.aspx";
        var v = node_url.indexOf("top=1", 0);
        if (v >= 0) {
            //                if (top != self)
            //                    top.location = node_url;
            //                else
            //                    self.location = node_url;
            var newpage = window.open(node_url);
            newpage.blur();
            return;
        }
        var n = window.top.center.getComponent(node_id);

        if (n) {//判断是否已经打开该面板
            window.top.center.remove(n);
        }
        n = window.top.center.add({
            xtype: "panel",
            id: node_id,
            iconCls: 'totalicon',
            title: node_text,
            closable: true,  //通过html载入目标页
            html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="' + node_url + '"></iframe>'
        });
        window.top.center.setActiveTab(n);
    }
</script>
</html>
